package cn.cvs.service.impl;

import cn.cvs.dao.SysRoleDao;
import cn.cvs.pojo.SysRole;
import cn.cvs.service.SysRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysRoleServiceImpl implements SysRoleService {
    @Autowired
    private SysRoleDao sysRoleDao;
    @Override
    public List<SysRole> findAllSysRole() {
        return sysRoleDao.findAllSysRole();
    }

    @Override
    public int getByCode(String code) {
        return sysRoleDao.getByCode(code);
    }

    @Override
    public int addSysRole(SysRole sysRole) {
        return sysRoleDao.addSysRole(sysRole);
    }

    @Override
    public int delSysRole(Integer id) {
        return sysRoleDao.delSysRole(id);
    }

    @Override
    public SysRole getBySysRoleOrId(Integer id) {
        return sysRoleDao.getBySysRoleOrId(id);
    }

    @Override
    public int updateSysRole(SysRole sysRole) {
        return sysRoleDao.updateSysRole(sysRole);
    }

    @Override
    public int sysRoleCount(Integer id) {
        return sysRoleDao.sysRoleCount(id);
    }
}
